package com.project.fiveCerealsSavoury.transfer;

public class UserBuy {
	private Integer goodId;
	/**
	 * 备注
	 */
	private String remark;
	
	/**
	 * 商品名称
	 */
	private String goodName;
	
	/**
	 * 商品数量
	 */
	private Integer goodNumber;
	
	/**
	 * 商品单价
	 */
	private Double goodPrice;
	
	/**
	 * 地址id
	 */
	private Integer addressId;

	public Integer getGoodId() {
		return goodId;
	}

	public void setGoodId(Integer goodId) {
		this.goodId = goodId;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getGoodName() {
		return goodName;
	}

	public void setGoodName(String goodName) {
		this.goodName = goodName;
	}

	public Integer getGoodNumber() {
		return goodNumber;
	}

	public void setGoodNumber(Integer goodNumber) {
		this.goodNumber = goodNumber;
	}

	public Double getGoodPrice() {
		return goodPrice;
	}

	public void setGoodPrice(Double goodPrice) {
		this.goodPrice = goodPrice;
	}

	public Integer getAddressId() {
		return addressId;
	}

	public void setAddressId(Integer addressId) {
		this.addressId = addressId;
	}

	@Override
	public String toString() {
		return "UserBuy [goodId=" + goodId + ", remark=" + remark + ", goodName=" + goodName + ", goodNumber="
				+ goodNumber + ", goodPrice=" + goodPrice + ", addressId=" + addressId + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((addressId == null) ? 0 : addressId.hashCode());
		result = prime * result + ((goodId == null) ? 0 : goodId.hashCode());
		result = prime * result + ((goodName == null) ? 0 : goodName.hashCode());
		result = prime * result + ((goodNumber == null) ? 0 : goodNumber.hashCode());
		result = prime * result + ((goodPrice == null) ? 0 : goodPrice.hashCode());
		result = prime * result + ((remark == null) ? 0 : remark.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		UserBuy other = (UserBuy) obj;
		if (addressId == null) {
			if (other.addressId != null)
				return false;
		} else if (!addressId.equals(other.addressId))
			return false;
		if (goodId == null) {
			if (other.goodId != null)
				return false;
		} else if (!goodId.equals(other.goodId))
			return false;
		if (goodName == null) {
			if (other.goodName != null)
				return false;
		} else if (!goodName.equals(other.goodName))
			return false;
		if (goodNumber == null) {
			if (other.goodNumber != null)
				return false;
		} else if (!goodNumber.equals(other.goodNumber))
			return false;
		if (goodPrice == null) {
			if (other.goodPrice != null)
				return false;
		} else if (!goodPrice.equals(other.goodPrice))
			return false;
		if (remark == null) {
			if (other.remark != null)
				return false;
		} else if (!remark.equals(other.remark))
			return false;
		return true;
	}
}
